package com.mmp.main.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the sp_inventory_transaction database table.
 *
 */
@Entity
@Table(name = "sp_inventory_transaction")
@NamedQuery(name = "SpInventoryTransaction.findAll", query = "SELECT s FROM SpInventoryTransaction s")
public class SpInventoryTransaction implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	private Integer id;

	@ManyToOne
	@JoinColumn(name = "site_id")
	private Site site;

	@ManyToOne
	@JoinColumn(name = "sp_inventory_content_id")
	private SpInventoryContent spInventoryContent;

	@ManyToOne
	@JoinColumn(name = "job_order_id")
	private JobOrder jobOrder;

	private Boolean input;

	@Column(name = "quantity")
	private Integer quantity;

	@Column(name = "unit_price")
	private Float unitPrice;

	@ManyToOne
	@JoinColumn(name = "performed_by")
	private User performedBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "performed_in")
	private Date performedIn;

	public SpInventoryTransaction() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Site getSite() {
		return site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	public SpInventoryContent getSpInventoryContent() {
		return spInventoryContent;
	}

	public void setSpInventoryContent(SpInventoryContent spInventoryContent) {
		this.spInventoryContent = spInventoryContent;
	}

	public JobOrder getJobOrder() {
		return jobOrder;
	}

	public void setJobOrder(JobOrder jobOrder) {
		this.jobOrder = jobOrder;
	}

	public Boolean getInput() {
		return input;
	}

	public void setInput(Boolean input) {
		this.input = input;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public Float getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Float unitPrice) {
		this.unitPrice = unitPrice;
	}

	public User getPerformedBy() {
		return performedBy;
	}

	public void setPerformedBy(User performedBy) {
		this.performedBy = performedBy;
	}

	public Date getPerformedIn() {
		return performedIn;
	}

	public void setPerformedIn(Date performedIn) {
		this.performedIn = performedIn;
	}

}
